﻿//-----------------------------------------------------------------------
// <copyright file="TeamFoundationServerDataContract.cs" company="CodePlex">
//     Copyright (c) Doug Holland, CodePlex. All rights reserved.
// </copyright>
//-----------------------------------------------------------------------
namespace CodePlex.Diagnostics.Contracts
{
    using System;

    using System.Runtime.Serialization;

    /// <summary>
    /// Represents an instance of Microsoft Team Foundation Server where exceptions and log entries are promoted to work items.
    /// </summary>
    [DataContract(Name = "TeamFoundationServerDataContract", Namespace = "http://schemas.datacontract.org/2004/07/CodePlex.Diagnostics.Contracts")]
    public sealed class TeamFoundationServerDataContract : IExtensibleDataObject
    {
        #region public TeamFoundationServerDataContract()

        /// <summary>
        /// Initializes a new instance of the <see cref="T:TeamFoundationServerDataContract"/> class.
        /// </summary>
        /// <param name="uri">The <see cref="T:System.Uri"/> representing the Microsoft Team Foundation Server.</param>
        public TeamFoundationServerDataContract(Uri uri)
        {
            this.Uri = uri;
        }

        #endregion

        #region ExtensionDataObject IExtensibleDataObject.ExtensionData

        /// <summary>
        /// Gets or sets the structure that contains extra data.
        /// </summary>
        /// <value>An <see cref="T:System.Runtime.Serialization.ExtensionDataObject"/> that contains data that is not recognized as belonging to the data contract.</value>
        ExtensionDataObject IExtensibleDataObject.ExtensionData
        {
            get;
            set;
        }

        #endregion

        #region public Uri Uri

        /// <summary>
        /// Gets or sets the <see cref="T:System.Uri"/> representing the Microsoft Team Foundation Server.
        /// </summary>
        /// <value>The <see cref="T:System.Uri"/> representing the Microsoft Team Foundation Server.</value>
        [DataMember]
        public Uri Uri
        {
            get;
            set;
        }

        #endregion
    }
}